home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / public / ghostscript / src / gp_mswtx.h < prev    next >
C/C++ Source or Header  |  1994-08-01  |  2KB  |  75 lines

  1. /* Copyright (C) 1993  Russell Lang
  2.  
  3. Permission to use, copy, modify, distribute, and sell this
  4. software and its documentation for any purpose is hereby granted
  5. without fee, provided that the above copyright notice and this
  6. permission notice appear in all copies of the software and related
  7. documentation.
  8. */
  9.  
  10. /* gp_mswtx.h */
  11. /*
  12.  * Microsoft Windows 3.n text window definitions for Ghostscript.
  13.  * Original version by Russell Lang.
  14.  */
  15.  
  16. #ifdef _WINDOWS
  17. #define _Windows
  18. #endif
  19.  
  20. /* ================================== */
  21. /* For WIN32 API's 
  22. #ifdef WIN32
  23. #define DEFAULT_CHARSET ANSI_CHARSET
  24. #define OFFSETOF(x)  (x)
  25. #define SELECTOROF(x)  (x)
  26. #endif
  27.  
  28. /* ================================== */
  29. /* text window structure */
  30. /* If an optional item is not specified it must be zero */
  31. #define MAXFONTNAME 80
  32. typedef void (*shutdown_ptr)();
  33. typedef struct tagTW
  34. {
  35.     HINSTANCE hInstance;        /* required */
  36.     HINSTANCE hPrevInstance;    /* required */
  37.     LPSTR    Title;            /* required */
  38.     POINT    ScreenSize;        /* optional */
  39.     unsigned int KeyBufSize;    /* optional */
  40.     LPSTR    DragPre;        /* optional */
  41.     LPSTR    DragPost;        /* optional */
  42.     int    nCmdShow;        /* optional */
  43.     shutdown_ptr shutdown;        /* optional */
  44.     HICON    hIcon;            /* optional */
  45.     HWND    hWndText;
  46.     BYTE FAR *ScreenBuffer;
  47.     BYTE FAR *KeyBuf;
  48.     BYTE FAR *KeyBufIn;
  49.     BYTE FAR *KeyBufOut;
  50.     BOOL    bFocus;
  51.     BOOL    bGetCh;
  52.     char    fontname[MAXFONTNAME];    /* font name */
  53.     int    fontsize;        /* font size in pts */
  54.     HFONT    hfont;
  55.     int    CharAscent;
  56.     int    CaretHeight;
  57.     int    CursorFlag;
  58.     POINT    CursorPos;
  59.     POINT    ClientSize;
  60.     POINT    CharSize;
  61.     POINT    ScrollPos;
  62.     POINT    ScrollMax;
  63. } TW;
  64. typedef TW FAR*  LPTW;
  65.  
  66. /* ================================== */
  67. void TextMessage(void);
  68. int TextInit(LPTW lptw);
  69. void TextClose(LPTW lptw);
  70. void TextToCursor(LPTW lptw);
  71. int TextKBHit(LPTW);
  72. int TextGetCh(LPTW);
  73. int TextPutCh(LPTW lptw, BYTE ch);
  74. void TextWriteBuf(LPTW lptw, LPSTR buf, int cnt);
  75.